from django.conf.urls.defaults import *
import views

urlpatterns = patterns('',
    url(r'^$', views.main),
    url(r'^map/$', views.map, {'map_type':None}),
    url(r'^wrongurl$', views.wrongurl),
    url(r'^map/(?P<map_type>[a-zA-z/_]+)', views.map),
    url(r'^edit$', views.edit),
    url(r'^edit/save$', views.save),
    url(r'^addpoint$', views.addpoint),
    url(r'^addpoint/$', views.addpoint),    
    url(r'^reviewpending/', views.review_pending),
    url(r'^links/$', views.links),
    url(r'^signup/$', views.signup),
    url(r'^detail/(?P<element_id>\d+)/edit', views.detail_edit, name="detail-edit"),
    url(r'^detail/(?P<element_id>\d+)$', views.detail,name="detail-view"),
    url(r'^detail/(?P<element_id>\d+)/(?P<merch_obj_id>\d+)$', views.detailmerch,name="detail-merch"),
    url(r'^detail/all', views.detail_all),
    url(r'^detail/$', views.detail_noid),
    url(r'^section/(?P<section_name>[a-zA-Z/_]+)', views.section,name="section"),
    url(r'^event/(?P<event_id>\d+)$', views.event),
    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name':'map/loginpage.html'}),
    url(r'^logout$',  views.do_logout),
    url(r'^comments/', include('django.contrib.comments.urls')),
    url(r'^vote/$', views.vote_on_comment),
    url(r'^utils/graphics/pctimage/', views.return_rating_image),
    url(r'^stars/$', views.stars_rating),
    url(r'^mstars$', views.stars_rating_merchant),
    url(r'^wstars$', views.stars_rating_walks),
    url(r'^search$', views.search),
    url(r'^mymarkers$', views.mymarkers),
    url(r'^merchant/add/(?P<marker_id>\d+)$', views.merchantedit),
    url(r'^merchant/edit/(?P<marker_id>\d+)/(?P<merch_obj_id>\d+)$', views.merchantedit, name="merch-edit"),
    url(r'^about$', views.standard_content, {'reference':'about.html'}),
    url(r'^advertise$', views.standard_content, {'reference':'advertise.html'}),
    url(r'^contact$', views.standard_content, {'reference':'contact.html'}),
    url(r'^help_us$', views.standard_content, {'reference':'help.html'}),
    url(r'^awards$', views.standard_content, {'reference':'awards.html'}),
    url(r'^walks$', views.show_walks, {'walk_id':None}),
    url(r'^walks/(?P<walk_id>\d+)', views.show_walks),
    url(r'^addwalk$', views.make_walks),
    url(r'^poipost$', views.handle_poi),
    url(r'^thanks$', views.thanks),
    url(r'^(?P<slug>.+)/$', views.check_for_slug),
    url(r'^(?P<slug>.+)$', views.check_for_slug),

)
